var MakeDirAssistant = function() {
}

MakeDirAssistant.prototype.run = function(future) {
	var args = this.controller.args;
	if(!args.path) {
		setError(future, "parameter path must be string");
	} else {
		path.exists(args.path, function(exists) {
			if(exists) {
				setError(future, "path already exists");
			} else {
				child_process.spawn("mkdir", ["-p", args.path]).on("exit", function(code) {
					setResult(future, code);
				});
			}
		});
	}
}
